import dfbz.com.utils.MailUtil;
import org.junit.Test;

import java.util.Random;

public class Demo1 {


    @Test
    public void method1() {
        System.out.println("Hello");
    }

    @Test
    public void method2() {

        String email = "1669894980@qq.com";
        try {
            MailUtil.send(email,"我是163的代理人","测试发送给你啦！！",MailUtil.UNICODE);
        } catch (Exception e) {
            e.printStackTrace();
        }

    }
    @Test
    public  void randomCode() {

        System.out.println(String.valueOf((Math.random() * 9 + 1) * 100000));

    }
    @Test
    public  void randomCode2() {
        StringBuilder str = new StringBuilder();
        Random random = new Random();
        for (int i = 0; i < 6; i++) {
            str.append(random.nextInt(10));
        }
        System.out.println(str.toString());
    }
}